import nodejs from '@feidao-factory/atom-nodejs/msg/nodejs';
import { spaceid } from '../../atom/config';

interface Message {
	filter: {
		[key: string]: string
	};
	page_no: number;
}


interface IRes {
	category_name: string;
}

export default async function atom(msg: Message, action_id: string, session_id: string) {
	await new Promise<IRes[]>((resolve, reject) => {
		setTimeout(async () => {
			resolve();
		}, 100000);
	});
	return nodejs<IRes[]>(action_id, session_id, spaceid, 'nodejs-msg/zj-000001/s001', {
		filter: {
			commodity_name: { $like: '%双飞燕%' }
		}
	});
}
